/*
 * @Author: sxw
 * @Date: 2023-03-23
 * @LastEditors: sxw
 * @LastEditTime: 2023-03-23
 * @Description: 请填写简介
 */
import config from "@/config"
import http from "@/utils/request"

export default {
	list: {
		url: `${config.API_URL}/enterprise/department/all`,
		name: '获取部门列表（所有部门信息）',
		get: async function () {
			return await http.get(this.url);
		}
	},
	userList: {
		url: `${config.API_URL}/enterprise/enterprise/page`,
		name: '获取员工列表（分页查询）',
		get: async function (params) {
			return await http.post(this.url, params)
		}
	},
	roleList: {
		url: `${config.API_URL}/enterprise/role/findList`,
		name: '获取角色列表',
		get: async function () {
			return await http.get(this.url)
		}

	},
	authorityList: {
		url: `${config.API_URL}/enterprise/authority/findList`,
		name: '获取所有权限接口',
		get: async function () {
			return await http.get(this.url)
		}

	},
	addAuthDept: {
		url: `${config.API_URL}/enterprise/authority-department`,
		name: '新增部门权限',
		get: async function (params) {
			return await http.post(this.url,params)
		}
	},
	updateAuthDept: {
		url: `${config.API_URL}/enterprise/authority-department/update`,
		name: '修改部门权限',
		get: async function (params) {
			return await http.post(this.url,params)
		}
	},
	getAuthDept: {
		url: `${config.API_URL}/enterprise/authority/findDepartmentList`,
		name: '获取所有部门权限接口',
		get: async function (params) {
			return await http.get(this.url,params)
		}
	},
	addAuthRole: {
		url: `${config.API_URL}/enterprise/authority-role`,
		name: '新增角色权限',
		get: async function (params) {
			return await http.post(this.url,params)
		}
	},
	updateAuthRole: {
		url: `${config.API_URL}/enterprise/authority-role/update                                                                                                                                                                                                                                                                                                                                                                                         `,
		name: '修改角色权限',
		get: async function (params) {
			return await http.post(this.url,params)
		}
	},
	getAuthRole: {
		url: `${config.API_URL}/enterprise/authority/findRoleList`,
		name: '获取所有角色权限接口',
		get: async function (params) {
			return await http.get(this.url,params)
		}
	},
	addAuthUser: {
		url: `${config.API_URL}/enterprise/authority-enterprise`,
		name: '新增员工权限',
		get: async function (params) {
			return await http.post(this.url,params)
		}
	},
	updateAuthUser: {
		url: `${config.API_URL}/enterprise/authority-enterprise/update                                                                                                                                                                                                                                                                                                                                                                                        `,
		name: '修改员工权限',
		get: async function (params) {
			return await http.post(this.url,params)
		}
	},
	getAuthUser: {
		url: `${config.API_URL}/enterprise/authority/findEnterpriseList`,
		name: '获取所有员工权限接口',
		get: async function (params) {
			return await http.get(this.url,params)
		}
	}

}

